<h2>Pengelolaan Data Siswa </h2>
<br clear="all"/>
<?php
$jk = $this->referensi->get_list_referensi("jenis_kelamin");
$agama = $this->referensi->get_list_referensi("agama");
$angkatan = $this->referensi->get_list_referensi("angkatan");
?>
<table class="table tablepager">
    <thead>
        <tr>
            <th width="10px">No.</th>
            <th width="50px">NIS</th>
            <th width="50px">NISN</th>
            <th>Nama</th>
            <th width="50px">Jenis Kelamin</th>
            <th width="50px">Agama</th>
            <th width="50px">Angkatan</th>
            <th width="120px">Aksi</th>
        </tr>
    </thead>
    <tbody>
        <?php $no=1 ?>
        <?php foreach($data as $detail): ?>
            <tr>
                <td class="center"><?php echo $no++ ?></td>
                <td ><?php echo $detail['nis']?></td>
                <td ><?php echo $detail['nisn']?></td>
                <td ><?php echo strtoupper($detail['nama'])?></td>
                <td ><?php echo $jk[$detail['jenis_kelamin_id']]?></td>
                <td ><?php echo $agama[$detail['agama_id']]?></td>
                <td class="center"><?php echo $angkatan[$detail['angkatan_id']]?></td>
                <td class="center">
                    <?php echo anchor("kesiswaan/siswa/detail/".$detail['nisn'],"detail") ?> |
                    <?php echo anchor("kesiswaan/siswa/edit/".$detail['nisn'],"edit") ?> |
                    <?php echo anchor("kesiswaan/siswa/delete/".$detail['nisn'],"delete",array("onclick"=>"return confirm('Apakah Anda yakin akan menghapus data ini?')")) ?>
                </td>
            </tr>
        <?php endforeach ?>
    </tbody>
</table>
<?php $this->load->view("elements/pager") ?>
<?php echo anchor("kesiswaan/siswa/add", "Tambah Data", array("class"=>"button")) ?>
